{template 'header', 'member'}
<script type="text/javascript">menuChanger('menu_web');</script>
<div class="menus">
	<table cellpadding="0" cellspacing="0">
		<tr>
			<td class="tab" id="add"><a href="page.php?action=add"><span>添加单页</span></a></td>
			<td class="tab_nav">&nbsp;</td>
			<td class="tab" id="s3"><a href="page.php"><span>已发布<span class="px10">({$nums[3]})</span></span></a></td>
			<td class="tab_nav">&nbsp;</td>
			<td class="tab" id="s2"><a href="page.php?status=2"><span>审核中<span class="px10">({$nums[2]})</span></span></a></td>
			<td class="tab_nav">&nbsp;</td>
			<td class="tab" id="s1"><a href="page.php?status=1"><span>未通过<span class="px10">({$nums[1]})</span></span></a></td>
		</tr>
	</table>
</div>
{if $action=='add'}
<form method="post" action="page.php" id="dform" >
	<input type="hidden" name="action" value="{$action}"/>
	<table class="data-form">
		<tr>
			<th width="90"><span class="cred">*</span> 单页标题</th>
			<td class="tr"><input name="post[title]" type="text" datatype="*2-999" nullmsg="请填写标题" errormsg="最少输入2个字符" size="30"/> {dstyle('post[style]')} <span id="dtitle" class="cred"></span> <span class="f_gray">建议4-6个汉字，例如“总裁致辞”、“企业文化”等</span></td>
		</tr>
		<tr>
			<th width="90"><span class="cred">*</span> 单页内容</th>
			<td class="tr">
				{Post::kindEditor('post[content]', $moduleid, $content, 'datatype="*5-99999" nullmsg="请填写内容" errormsg="内容最少5字"','675px')}
			</td>
		</tr>
		<tr>
			<th width="90">排序</th>
			<td class="tr"><input type="text" size="5" name="post[listorder]" id="listorder" value="0"/> <span class="f_gray">请填写数字，数字越大越靠前</span></td>
		</tr>
		<tr>
			<th width="90">&nbsp;</th>
			<td class="tr" height="50"><input type="submit" name="submit" value=" 确 定 " class="btn"/>&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" name="reset" value=" 重 置 " class="btn"/></td>
		</tr>
	</table>
</form>
<script type="text/javascript">s('page');
m('add');</script>
	{elseif $action=='edit'}
<form method="post" action="page.php" id="dform" >
	<input type="hidden" name="action" value="{$action}"/>
	<input type="hidden" name="itemid" value="{$itemid}"/>
	<input type="hidden" name="forward" value="{$forward}"/>
	<table class="data-form">
		{if $status==1 && $note}
			<tr>
				<th width="90">未通过原因</th>
				<td class="tr f_blue">{$note}</td>
			</tr>
		{/if}
		<tr>
			<th width="90"><span class="cred">*</span> 单页标题</th>
			<td class="tr"><input name="post[title]" type="text" id="title" size="30" datatype="*2-999" nullmsg="请填写标题" errormsg="最少输入2个字符" value="{$title}"/>  {dstyle('post[style]', $style)} <span id="dtitle" class="cred"></span> <span class="f_gray">建议4-6个汉字，例如“总裁致辞”、“企业文化”等</span></td>
		</tr>
		<tr>
			<th width="90"><span class="cred">*</span> 单页内容</th>
			<td class="tr">
				{Post::kindEditor('post[content]', $moduleid, $content, 'datatype="*5-99999" nullmsg="请填写内容" errormsg="内容最少5字"','675px')}
			</td>
		</tr>
		<tr>
			<th width="90">排序</th>
			<td class="tr"><input type="text" size="5" name="post[listorder]" id="listorder" value="{$listorder}"/> <span class="f_gray">请填写数字，数字越大越靠前</span></td>
		</tr>
		<tr>
			<th width="90">&nbsp;</th>
			<td class="tr" height="50"><input type="submit" name="submit" value=" 修 改 " class="btn"/>&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value=" 返 回 " class="btn" onclick="history.back(-1);"/></td>
		</tr>
	</table>
</form>
<script type="text/javascript">s('page');
m('s{$status}');</script>
	{else}
<form action="page.php">
	<input type="hidden" name="status" value="{$status}"/>

	<div class="tt">
		&nbsp;<input type="text" size="60" name="kw" value="{$kw}" title="关键词"/> &nbsp;
		<input type="submit" value=" 搜 索 " class="btn"/>
		<input type="button" value=" 重 置 " class="btn" onclick="window.location='page.php?status={$status}';"/>
	</div>
</form>
<div class="ls">
	<table class="data-form">
		<tr>
			<th>标题</th>
			<th>添加时间</th>
			<th>更新时间</th>
			<th>浏览</th>
			<th width="40">修改</th>
			<th width="40">删除</th>
		</tr>
		{loop $lists $k $v}
			<tr>
				<td height="30" align="left">&nbsp;&nbsp;&nbsp;{if $status==3}<a href="{$v[linkurl]}" class="t" target="_blank">{else}<a href="page.php?action=edit&itemid={$v[itemid]}" class="t">{/if}{$v[title]}</a>{if $v[status]==1 && $v[note]} <a href="javascript:"
				                                                                                                                                                                                                                                         onclick="alert('{$v[note]}');"><img
						src="image/why.gif" title="未通过原因"/></a>{/if}</td>
				<td class="px11 f_gray">{$v[adddate]}</td>
				<td class="px11 f_gray">{$v[editdate]}</td>
				<td class="px11 f_gray">{$v[hits]}</td>
				<td><a href="page.php?action=edit&itemid={$v[itemid]}"><img width="16" height="16" src="image/edit.png" title="修改" alt=""/></a></td>
				<td><a href="page.php?action=delete&itemid={$v[itemid]}" onclick="if(!confirm('确定要删除吗？此操作将不可撤销')) return false;"><img width="16" height="16" src="image/delete.png" title="删除" alt=""/></a></td>
			</tr>
		{/loop}
	</table>
</div>
	{if $MG[page_limit]}
	<div class="con">总共可发 <span class="f_b cred">{$MG[page_limit]}</span> 条&nbsp;&nbsp;&nbsp;当前已发 <span class="f_b">{$limit_used}</span> 条&nbsp;&nbsp;&nbsp;还可以发 <span class="f_b f_blue">{$limit_free}</span> 条</div>
	{/if}
<br/>
&nbsp;说明：企业单页用于添加“总裁致辞”、“企业文化”、“发展历程”等内容，将显示在企业黄页
<div class="pages">{$pages}</div>
<script type="text/javascript">s('page');
m('s{$status}');</script>
{/if}
{if $action=='add' || $action=='edit'}
<script type="text/javascript">
	seajs.use(['$', 'vf', 'vf-css', 'easyui','easyui-css'], function($){
		$('#dform').Validform({
			beforeCheck:function(curform){
				lemon.editor.post_content_.sync();
			}
		});
	})
</script>
{/if}
{template 'footer', 'member'}